//
//  AccountMemageViewController.m
//  JianChaRiBao
//
//  Created by Changxy on 13-6-4.
//  Copyright (c) 2013年 wzyk. All rights reserved.
//

#import "AccountMemageViewController.h"
#import "ChagePasswordViewController.h"
#import "AppDelegate.h"
#import "ChangeTelNumberViewController.h"
@interface AccountMemageViewController ()

@end

@implementation AccountMemageViewController
@synthesize mDict = _mDict;
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}
- (IBAction)back:(id)sender {
    [self.navigationController popToRootViewControllerAnimated:YES];
}
- (IBAction)logoOut:(id)sender {
}
- (IBAction)changePassword:(id)sender {
    ChagePasswordViewController * changePassworld = [[ChagePasswordViewController alloc]initWithNibName:@"ChagePasswordViewController" bundle:nil];
    [[UIApplication rootNavController] pushViewController:changePassworld animated:YES];
    [changePassworld release];
}
- (IBAction)changeTelNumber:(id)sender {
    ChangeTelNumberViewController * changeTel = [[ChangeTelNumberViewController alloc]initWithNibName:@"ChangeTelNumberViewController" bundle:nil];
    [[UIApplication rootNavController] pushViewController:changeTel animated:YES];
    [changeTel release];
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
    shouldSwipeBack = YES;
//    self.mDict = [AuthorManager defaultManager].userInfo;
    self.mDict = [AuthorManager defaultManager].userInfo;
    username.text = [self.mDict objectForKey:@"user_name"];
    email.text = [self.mDict objectForKey:@"email"];
    telnumber.text = [self.mDict objectForKey:@""];
    share.text = [self.mDict objectForKey:@""];
    comment.text = [self.mDict objectForKey:@""];
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (void)dealloc {
    [username release];
    [email release];
    [telnumber release];
    [share release];
    [comment release];
    [super dealloc];
}
- (void)viewDidUnload {
    [username release];
    username = nil;
    [email release];
    email = nil;
    [telnumber release];
    telnumber = nil;
    [share release];
    share = nil;
    [comment release];
    comment = nil;
    [super viewDidUnload];
}
@end
